package com.example.demo.mapper;

import com.example.demo.model.UserInfo;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Home-pc
 * Date: 2024-01-24
 * Time: 10:42
 */
@Mapper
public interface UserInfo2Mapper {

    @Select("<script> select *" +
            " from test3" +
            " <where>" +
            " <if test='age != null'> and age = #{age} </if>" +
            " <if test='gender != null'> and gender = #{gender} </if>" +
            " </where>" +
            "</script>")
    List<UserInfo> queryByCondition(UserInfo userInfo);

    Integer updateByCondition(UserInfo userInfo);

    Integer updateByCondition1(UserInfo userInfo);

    Integer batchDelete(List<Integer> ids);
}
